#ifndef CLIDEFINITION_H
#define CLIDEFINITION_H

#include <QString>
#include <QList>
#include <QVector>
#include <QPoint>

namespace HIM {

const  std::string  HEADERSTART = "$$HEADERSTART";
const  std::string  ASCII = "$$ASCII";
const  std::string  BINARY = "$$BINARY";
const  std::string  UNITS = "$$UNITS/";
const  std::string  VERSION = "$$VERSION/";
const  std::string  DATE = "$$DATE/";
const  std::string  DIMENSION = "$$DIMENSION/";
const  std::string  LAYERS = "$$LAYERS/";
const  std::string  ALIGN = "$$ALIGN";
const  std::string  LABEL = "$$LABEL/";
const  std::string  USERDATA = "$$USERDATA/";
const  std::string  HEADEREND = "$$HEADEREND";
const  std::string  GEOMETRYSTART = "$$GEOMETRYSTART";
const  std::string  LAYER = "$$LAYER/";
const  std::string  POWER = "$$POWER/";
const  std::string  SPEED = "$$SPEED/";
const  std::string  FOCUS = "$$FOCUS/";
const  std::string  HATCHES = "$$HATCHES/";
const  std::string  POLYLINE = "$$POLYLINE/";
const  std::string  GEOMETRYEND = "$$GEOMETRYEND";

typedef struct {
    QPair<qint64,qint64> header{qMakePair(-1,-1)};
    QPair<qint64,qint64> geometry{qMakePair(-1,-1)};
    QVector<qint64> layer;
}CliDataIndex;

typedef struct {
    double speed{0.0};
    double power{0.0};
    double focus{0.0};
    int label{0};
    int lineNum{0};
    QVector<QPair<QPointF,QPointF>> hatchVector;
}CliHetchesData;

typedef struct {
    double zPos{0};
    QList<CliHetchesData> hatchesList;
}CliLayerData;

typedef struct {
    //Header
    QString format{""};
    double units{0};
    int version{0};
    int date{0};
    QVector<double> dimension;
    int layers{0};
    int align{32};
    QVector<QPair<int,QString>> label;
    QVector<QString> userData;
}CliHeaderData;

typedef struct {
    CliHeaderData header;
    //Geometry
    QList<CliLayerData>cliGeometryData;
}CliData;

}

#endif // CLIDEFINITION_H
